約 4,850,248 件
https://w.atwiki.jp/macoto_mayu/pages/15.html
?php // PukiWiki - Yet another WikiWikiWeb clone // $Id pukiwiki.ini.php,v 1.140 2006/06/11 14 35 39 henoheno Exp $ // Copyright (C) // 2002-2006 PukiWiki Developers Team // 2001-2002 Originally written by yu-ji // License GPL v2 or (at your option) any later version // // PukiWiki main setting file ///////////////////////////////////////////////// // Functionality settings // PKWK_OPTIMISE - Ignore verbose but understandable checking and warning // If you end testing this PukiWiki, set 1 . // If you feel in trouble about this PukiWiki, set 0 . if (! defined( PKWK_OPTIMISE )) define( PKWK_OPTIMISE , 0); ///////////////////////////////////////////////// // Security settings // PKWK_READONLY - Prohibits editing and maintain via WWW // NOTE Counter-related functions will work now (counter, attach count, etc) if (! defined( PKWK_READONLY )) define( PKWK_READONLY , 0); // 0 or 1 // PKWK_SAFE_MODE - Prohibits some unsafe(but compatible) functions if (! defined( PKWK_SAFE_MODE )) define( PKWK_SAFE_MODE , 1); //define( PKWK_SAFE_MODE , 0); // PKWK_DISABLE_INLINE_IMAGE_FROM_URI - Disallow using inline-image-tag for URIs // Inline-image-tag for URIs may allow leakage of Wiki readers information // (in short, Web bug ) or external malicious CGI (looks like an image s URL) // attack to Wiki readers, but easy way to show images. if (! defined( PKWK_DISABLE_INLINE_IMAGE_FROM_URI )) define( PKWK_DISABLE_INLINE_IMAGE_FROM_URI , 1); //define( PKWK_DISABLE_INLINE_IMAGE_FROM_URI , 0); // PKWK_QUERY_STRING_MAX // Max length of GET method, prohibits some worm attack ASAP // NOTE Keep (page-name + attach-file-name) = PKWK_QUERY_STRING_MAX define( PKWK_QUERY_STRING_MAX , 1024); // Bytes, 0 = OFF // define( PKWK_QUERY_STRING_MAX , 640); // Bytes, 0 = OFF ///////////////////////////////////////////////// // Experimental features // Multiline plugin hack (See BugTrack2/84) // EXAMPLE(with a known BUG) // #plugin(args1,args2,...,argsN){{ // argsN+1 // argsN+1 // #memo(foo) // argsN+1 // }} // #memo(This makes #memo(foo) to this) // define( PKWKEXP_DISABLE_MULTILINE_PLUGIN_HACK , 1); // 1 = Disabled define( PKWKEXP_DISABLE_MULTILINE_PLUGIN_HACK ,0); // 1 = Disabled ///////////////////////////////////////////////// // Language / Encoding settings // LANG - Internal content encoding ( en , ja , or ...) define( LANG , ja ); // UI_LANG - Content encoding for buttons, menus, etc define( UI_LANG , LANG); // en for Internationalized wikisite ///////////////////////////////////////////////// // Directory settings I (ended with / , permission 777 ) // You may hide these directories (from web browsers) // by setting DATA_HOME at index.php. define( DATA_DIR , DATA_HOME . wiki/ ); // Latest wiki texts define( DIFF_DIR , DATA_HOME . diff/ ); // Latest diffs define( BACKUP_DIR , DATA_HOME . backup/ ); // Backups define( CACHE_DIR , DATA_HOME . cache/ ); // Some sort of caches define( UPLOAD_DIR , DATA_HOME . attach/ ); // Attached files and logs define( COUNTER_DIR , DATA_HOME . counter/ ); // Counter plugin s counts define( TRACKBACK_DIR , DATA_HOME . trackback/ ); // TrackBack logs define( PLUGIN_DIR , DATA_HOME . plugin/ ); // Plugin directory // 20070716 Spam_Filter /////////////////////////////////////////////// //define( SPAM_FILTER_COND , #useragent() or #filename() or #atag() or #ngreg() or (#onlyeng() and (#urlnum() or #uaunknown())) or #urlbl() ); define( SPAM_FILTER_COND , #ipcountry() or #urlnsbl() or #useragent() or #filename() or #atag() or #ngreg() or #onlyeng() or (#urlnum() and #uaunknown()) ); //define( SPAM_FILTER_COND , #ipcountry() or #urlnsbl() or #useragent() or #filename() or #atag() or #ngreg() or (#onlyeng() and (#urlnum() or #uaunknown())) or #urlbl() or #ipbl() ); define( PLUGIN_REF_URL_GET_IMAGE_SIZE , FALSE); define( SPAM_FILTER_ATAG_REG , /\[HTTP | \/a |\[\/url\]/i ); ///////////////////////////////////////////////// ///////////////////////////////////////////////// // Directory settings II (ended with / ) // Skins / Stylesheets define( SKIN_DIR , skin/ ); // Skin files (SKIN_DIR/*.skin.php) are needed at // ./DATAHOME/SKIN_DIR from index.php, but // CSSs(*.css) and JavaScripts(*.js) are needed at // ./SKIN_DIR from index.php. // Static image files define( IMAGE_DIR , image/ ); // Keep this directory shown via web browsers like // ./IMAGE_DIR from index.php. ///////////////////////////////////////////////// // Local time setting switch (LANG) { // or specifiy one case ja define( ZONE , JST ); define( ZONETIME , 9 * 3600); // JST = GMT + 9 break; default define( ZONE , GMT ); define( ZONETIME , 0); break; } ///////////////////////////////////////////////// // Title of your Wikisite (Name this) // Also used as RSS feed s channel name etc $page_title = Belle Isle Wiki ; // Specify PukiWiki URL (default auto) $script = http //example.com/pukiwiki/ ; // Shorten $script Cut its file name (default not cut) //$script_directory_index = index.php ; $script_directory_index = index.php ; // Site admin s name (CHANGE THIS) $modifier = MonMon ; // Site admin s Web page (CHANGE THIS) $modifierlink = http //example.com/pukiwiki/ ; // Default page name // $defaultpage = FrontPage ; // Top / Default page $defaultpage = Belle Isle Wiki ; // Top / Default page $whatsnew = RecentChanges ; // Modified page list $whatsdeleted = RecentDeleted ; // Removeed page list $interwiki = InterWikiName ; // Set InterWiki definition here $menubar = MenuBar ; // Menu ///////////////////////////////////////////////// // Change default Document Type Definition // Some web browser s bug, and / or Java apprets may needs not-Strict DTD. // Some plugin (e.g. paint) set this PKWK_DTD_XHTML_1_0_TRANSITIONAL. //$pkwk_dtd = PKWK_DTD_XHTML_1_1; // Default //$pkwk_dtd = PKWK_DTD_XHTML_1_0_STRICT; //$pkwk_dtd = PKWK_DTD_XHTML_1_0_TRANSITIONAL; //$pkwk_dtd = PKWK_DTD_HTML_4_01_STRICT; //$pkwk_dtd = PKWK_DTD_HTML_4_01_TRANSITIONAL; ///////////////////////////////////////////////// // Always output "nofollow,noindex" attribute $nofollow = 0; // 1 = Try hiding from search engines ///////////////////////////////////////////////// // PKWK_ALLOW_JAVASCRIPT - Allow / Prohibit using JavaScript //define( PKWK_ALLOW_JAVASCRIPT , 0); define( PKWK_ALLOW_JAVASCRIPT , 1); ///////////////////////////////////////////////// // TrackBack feature // Enable Trackback $trackback = 0; // Show trackbacks with an another window (using JavaScript) $trackback_javascript = 0; ///////////////////////////////////////////////// // Bodycache feature // enable bodycache or not // default true $enable_bodycache = true; // use bodycache as default. If it s false, // #bodycache(enable) is required per page. // default true $enable_bodycache_default = true; // If these (block) plugins are contained in page, bodycache will be disabled. // Users can increase this plugin list to control bodycache. // default array( ls2 , pcomment , include ); // $bodycache_disable_plugins = array( ls2 , pcomment , include ); // $bodycache_disable_plugins = array( ls2 , pcomment , include , sitesearch , table_edit , article ); $bodycache_disable_plugins = array( ls2 , areaedit ); ///////////////////////////////////////////////// ///////////////////////////////////////////////// // Referer list feature $referer = 0; ///////////////////////////////////////////////// // _Disable_ WikiName auto-linking // $nowikiname = 0; $nowikiname = 1; ///////////////////////////////////////////////// // AutoLink feature // AutoLink minimum length of page name $autolink = 0; // Bytes, 0 = OFF (try 8) ///////////////////////////////////////////////// // Enable Freeze / Unfreeze feature $function_freeze = 1; ///////////////////////////////////////////////// // Allow to use Do not change timestamp checkbox // (0 Disable, 1 For everyone, 2 Only for the administrator) // $notimeupdate = 1; $notimeupdate = 0; ///////////////////////////////////////////////// // Admin password for this Wikisite // Default always fail $adminpass = {x-php-md5}! ; // Sample //$adminpass = pass ; // Cleartext //$adminpass = {x-php-md5}1a1dc91c907325c69271ddf0c944bc72 ; // PHP md5() pass //$adminpass = {CRYPT}$1$AR.Gk94x$uCe8fUUGMfxAPH83psCZG/ ; // LDAP CRYPT pass //$adminpass = {MD5}Gh3JHJBzJcaScd3wyUS8cg== ; // LDAP MD5 pass //$adminpass = {SMD5}o7lTdtHFJDqxFOVX09C8QnlmYmZnd2Qx ; // LDAP SMD5 pass ///////////////////////////////////////////////// // Page-reading feature settings // (Automatically creating pronounce datas, for Kanji-included page names, // to show sorted page-list correctly) // Enable page-reading feature by calling ChaSen or KAKASHI command // (1 Enable, 0 Disable) $pagereading_enable = 0; // Specify converter as ChaSen( chasen ) or KAKASI( kakasi ) or None( none ) $pagereading_kanji2kana_converter = none ; // Specify Kanji encoding to pass data between PukiWiki and the converter $pagereading_kanji2kana_encoding = EUC ; // Default for Unix //$pagereading_kanji2kana_encoding = SJIS ; // Default for Windows // Absolute path of the converter (ChaSen) $pagereading_chasen_path = /usr/local/bin/chasen ; //$pagereading_chasen_path = c \progra~1\chasen21\chasen.exe ; // Absolute path of the converter (KAKASI) $pagereading_kakasi_path = /usr/local/bin/kakasi ; //$pagereading_kakasi_path = c \kakasi\bin\kakasi.exe ; // Page name contains pronounce data (written by the converter) $pagereading_config_page = config/PageReading ; // Page name of default pronouncing dictionary, used when converter = none $pagereading_config_dict = config/PageReading/dict ; ///////////////////////////////////////////////// // User definition $auth_users = array( // Username = password foo = foo_passwd , // Cleartext bar = {x-php-md5}f53ae779077e987718cc285b14dfbe86 , // PHP md5() bar_passwd hoge = {SMD5}OzJo/boHwM4q5R+g7LCOx2xGMkFKRVEx , // LDAP SMD5 hoge_passwd ); ///////////////////////////////////////////////// // Authentication method $auth_method_type= pagename ;// By Page name //$auth_method_type= contents ;// By Page contents ///////////////////////////////////////////////// // Read auth (0 Disable, 1 Enable) $read_auth = 0; $read_auth_pages = array( // Regex Username #HogeHoge# = hoge , #(NETABARE|NetaBare)# = foo,bar,hoge , ); ///////////////////////////////////////////////// // Edit auth (0 Disable, 1 Enable) $edit_auth = 0; $edit_auth_pages = array( // Regex Username #BarDiary# = bar , #HogeHoge# = hoge , #(NETABARE|NetaBare)# = foo,bar,hoge , ); ///////////////////////////////////////////////// // Search auth // 0 Disabled (Search read-prohibited page contents) // 1 Enabled (Search only permitted pages for the user) $search_auth = 0; ///////////////////////////////////////////////// // $whatsnew Max number of RecentChanges $maxshow = 60; // $whatsdeleted Max number of RecentDeleted // (0 = Disabled) $maxshow_deleted = 60; ///////////////////////////////////////////////// // Page names can t be edit via PukiWiki $cantedit = array( $whatsnew, $whatsdeleted ); ///////////////////////////////////////////////// // HTTP Output Last-Modified header // $lastmod = 0; $lastmod = 1; ///////////////////////////////////////////////// // Date format $date_format = Y-m-d ; // Time format $time_format = H i s ; ///////////////////////////////////////////////// // Max number of RSS feed $rss_max = 15; ///////////////////////////////////////////////// // Backup related settings // Enable backup $do_backup = 1; // When a page had been removed, remove its backup too? $del_backup = 0; // Bacukp interval and generation $cycle = 0; // Wait N hours between backup (0 = no wait) $maxage = 50; // Stock latest N backups // NOTE $cycle x $maxage / 24 = Minimum days to lost your data // 3 x 120 / 24 = 15 // Splitter of backup data (NOTE Too dangerous to change) define( PKWK_SPLITTER , ); ///////////////////////////////////////////////// // Command execution per update define( PKWK_UPDATE_EXEC , ); // Sample Namazu (Search engine) //$target = /var/www/wiki/ ; //$mknmz = /usr/bin/mknmz ; //$output_dir = /var/lib/namazu/index/ ; //define( PKWK_UPDATE_EXEC , //$mknmz . --media-type=text/pukiwiki . // -O . $output_dir . -L ja -c -K . $target); ///////////////////////////////////////////////// // HTTP proxy setting (for TrackBack etc) // Use HTTP proxy server to get remote data $use_proxy = 0; $proxy_host = proxy.example.com ; $proxy_port = 8080; // Do Basic authentication $need_proxy_auth = 0; $proxy_auth_user = username ; $proxy_auth_pass = password ; // Hosts that proxy server will not be needed $no_proxy = array( localhost ,// localhost 127.0.0.0/8 ,// loopback // 10.0.0.0/8 // private class A // 172.16.0.0/12 // private class B // 192.168.0.0/16 // private class C // no-proxy.com , ); //////////////////////////////////////////////// // Mail related settings // Send mail per update of pages $notify = 0; // Send diff only $notify_diff_only = 1; // SMTP server (Windows only. Usually specified at php.ini) $smtp_server = localhost ; // Mail recipient (To ) and sender (From ) $notify_to = to@example.com ;// To $notify_from = from@example.com ;// From // Subject ($page = Page name wll be replaced) $notify_subject = [PukiWiki] $page ; // Mail header // NOTE Multiple items must be divided by "\r\n", not "\n". $notify_header = ; ///////////////////////////////////////////////// // Mail POP / APOP Before SMTP // Do POP/APOP authentication before send mail $smtp_auth = 0; $pop_server = localhost ; $pop_port = 110; $pop_userid = ; $pop_passwd = ; // Use APOP instead of POP (If server uses) // Default = Auto (Use APOP if possible) // 1 = Always use APOP // 0 = Always use POP // $pop_auth_use_apop = 1; ///////////////////////////////////////////////// // Ignore list // Regex of ignore pages $non_list = ^\ ; // Search ignored pages $search_non_list = 1; ///////////////////////////////////////////////// // Template setting $auto_template_func = 1; $auto_template_rules = array( ((.+)\/([^\/]+)) = \2/template ); ///////////////////////////////////////////////// // Automatically add fixed heading anchor $fixed_heading_anchor = 1; ///////////////////////////////////////////////// // 見出しごとの編集を可能にする // (固有のアンカーが挿入されている見出し行にのみ有効) $fixed_heading_anchor_edit = 1; ///////////////////////////////////////////////// // Remove the first spaces from Preformatted text $preformat_ltrim = 1; ///////////////////////////////////////////////// // Convert linebreaks into br / $line_break = 0; ///////////////////////////////////////////////// // Use date-time rules (See rules.ini.php) $usedatetime = 1; ///////////////////////////////////////////////// // User-Agent settings // // If you want to ignore embedded browsers for rich-content-wikisite, // remove (or comment-out) all keitai settings. // // If you want to to ignore desktop-PC browsers for simple wikisite, // copy keitai.ini.php to default.ini.php and customize it. $agents = array( // pattern A regular-expression that matches device(browser) s name and version // profile A group of browsers // Embedded browsers (Rich-clients for PukiWiki) // Windows CE (Microsoft(R) Internet Explorer 5.5 for Windows(R) CE) // Sample "Mozilla/4.0 (compatible; MSIE 5.5; Windows CE; sigmarion3)" (sigmarion, Hand-held PC) array( pattern = #\b(? MSIE [5-9]).*\b(Windows CE)\b# , profile = default ), // ACCESS "NetFront" / "Compact NetFront" and thier OEM, expects to be "Mozilla/4.0" // Sample "Mozilla/4.0 (PS2; PlayStation BB Navigator 1.0) NetFront/3.0" (PlayStation BB Navigator, for SONY PlayStation 2) // Sample "Mozilla/4.0 (PDA; PalmOS/sony/model crdb/Revision 1.1.19) NetFront/3.0" (SONY Clie series) // Sample "Mozilla/4.0 (PDA; SL-A300/1.0,Embedix/Qtopia/1.1.0) NetFront/3.0" (SHARP Zaurus) array( pattern = #^(? Mozilla/4).*\b(NetFront)/([0-9\.]+)# , profile = default ), // Embedded browsers (Non-rich) // Windows CE (the others) // Sample "Mozilla/2.0 (compatible; MSIE 3.02; Windows CE; 240x320 )" (GFORT, NTT DoCoMo) array( pattern = #\b(Windows CE)\b# , profile = keitai ), // ACCESS "NetFront" / "Compact NetFront" and thier OEM // Sample "Mozilla/3.0 (AveFront/2.6)" ("SUNTAC OnlineStation", USB-Modem for PlayStation 2) // Sample "Mozilla/3.0(DDIPOCKET;JRC/AH-J3001V,AH-J3002V/1.0/0100/c50)CNF/2.0" (DDI Pocket AirH" Phone by JRC) array( pattern = #\b(NetFront)/([0-9\.]+)# , profile = keitai ), array( pattern = #\b(CNF)/([0-9\.]+)# , profile = keitai ), array( pattern = #\b(AveFront)/([0-9\.]+)# , profile = keitai ), array( pattern = #\b(AVE-Front)/([0-9\.]+)# , profile = keitai ), // The same? // NTT-DoCoMo, i-mode (embeded Compact NetFront) and FOMA (embedded NetFront) phones // Sample "DoCoMo/1.0/F501i", "DoCoMo/1.0/N504i/c10/TB/serXXXX" // c以降は可変 // Sample "DoCoMo/2.0 MST_v_SH2101V(c100;TB;W22H12;serXXXX;iccxxxx)" // ()の中は可変 array( pattern = #^(DoCoMo)/([0-9\.]+)# , profile = keitai ), // Vodafone s embedded browser // Sample "J-PHONE/2.0/J-T03"// 2.0は"ブラウザの"バージョン // Sample "J-PHONE/4.0/J-SH51/SNxxxx SH/0001a Profile/MIDP-1.0 Configuration/CLDC-1.0 Ext-Profile/JSCL-1.1.0" array( pattern = #^(J-PHONE)/([0-9\.]+)# , profile = keitai ), // Openwave(R) Mobile Browser (EZweb, WAP phone, etc) // Sample "OPWV-SDK/62K UP.Browser/6.2.0.5.136 (GUI) MMP/2.0" array( pattern = #\b(UP\.Browser)/([0-9\.]+)# , profile = keitai ), // Opera, dressing up as other embedded browsers // Sample "Mozilla/3.0(DDIPOCKET;KYOCERA/AH-K3001V/1.4.1.67.000000/0.1/C100) Opera 7.0" (Like CNF at keitai -mode) array( pattern = #\b(? DDIPOCKET|WILLCOM)\b.+\b(Opera) ([0-9\.]+)\b# , profile = keitai ), // Planetweb http //www.planetweb.com/ // Sample "Mozilla/3.0 (Planetweb/v1.07 Build 141; SPS JP)" ("EGBROWSER", Web browser for PlayStation 2) array( pattern = #\b(Planetweb)/v([0-9\.]+)# , profile = keitai ), // DreamPassport, Web browser for SEGA DreamCast // Sample "Mozilla/3.0 (DreamPassport/3.0)" array( pattern = #\b(DreamPassport)/([0-9\.]+)# , profile = keitai ), // Palm "Web Pro" http //www.palmone.com/us/support/accessories/webpro/ // Sample "Mozilla/4.76 [en] (PalmOS; U; WebPro)" array( pattern = #\b(WebPro)\b# , profile = keitai ), // ilinx "Palmscape" / "Xiino" http //www.ilinx.co.jp/ // Sample "Xiino/2.1SJ [ja] (v. 4.1; 153x130; c16/d)" array( pattern = #^(Palmscape)/([0-9\.]+)# , profile = keitai ), array( pattern = #^(Xiino)/([0-9\.]+)# , profile = keitai ), // SHARP PDA Browser (SHARP Zaurus) // Sample "sharp pda browser/6.1[ja](MI-E1/1.0) " array( pattern = #^(sharp [a-z]+ browser)/([0-9\.]+)# , profile = keitai ), // WebTV array( pattern = #^(WebTV)/([0-9\.]+)# , profile = keitai ), // Desktop-PC browsers // Opera (for desktop PC, not embedded) -- See BugTrack/743 for detail // NOTE Keep this pattern above MSIE and Mozilla // Sample "Opera/7.0 (OS; U)" (not disguise) // Sample "Mozilla/4.0 (compatible; MSIE 5.0; OS) Opera 6.0" (disguise) array( pattern = #\b(Opera)[/ ]([0-9\.]+)\b# , profile = default ), // MSIE Microsoft Internet Explorer (or something disguised as MSIE) // Sample "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)" array( pattern = #\b(MSIE) ([0-9\.]+)\b# , profile = default ), // Mozilla Firefox // NOTE Keep this pattern above Mozilla // Sample "Mozilla/5.0 (Windows; U; Windows NT 5.0; ja-JP; rv 1.7) Gecko/20040803 Firefox/0.9.3" array( pattern = #\b(Firefox)/([0-9\.]+)\b# , profile = default ), // Loose default Including something Mozilla array( pattern = #^([a-zA-z0-9 ]+)/([0-9\.]+)\b# , profile = default ), array( pattern = #^# , profile = default ),// Sentinel ); ?
https://w.atwiki.jp/nginx/pages/15.html
nginx php nginxでphpを動作させる方法を書いています。 nginxでphpを動作させるにはspawn-fcgi(lighthttpdというパッケージに含まれている)というラッパーが必要になります。 つまりnginx --- spawn-fcgi --- phpという風に連携させます。 http //d.hatena.ne.jp/demuyan/20080726 ここを参考にしています。 phpのインストール sudo aptitude install php5-common php5-cgi php5-mysql php5-cli spawn-fcgiを使ってphpを動作させます。 spawn-fcgiはlighttpdに含まれています。 lighttpdのインストール php5-cgiをFastCGIとして起動させるスクリプト(/usr/bin/php5-fastcgi)を作成します。 /usr/bin/php5-fastcgiの内容 重要なのは「-C 2」です。 このCオプションはspawn-fcgiのプロセス数を意味します。アクセス数が多ければ多いほど、この値を大きくしていきます。 アクセスがこれを超えると、いわゆるサーバーが落ちるという状態になります。 #!/bin/sh /usr/bin/spawn-fcgi -a 127.0.0.1 -p 9000 -u www-data -C 2 -f /usr/bin/php5-cgi php5-cgiの実行権限を設定します。 sudo chmod +x /usr/bin/php5-fastcgi リンクを作成します。 sudo ln -s /usr/bin/php5-fastcgi /usr/bin/php-fastcgi 起動用スクリプト/etc/init.d/fastcgiを作成します。 /etc/init.d/fastcgiの内容 #!/bin/bash PHP_SCRIPT=/usr/bin/php-fastcgi RETVAL=0 case "$1" in start) echo "Starting fastcgi" $PHP_SCRIPT RETVAL=$? ;; stop) echo "Stopping fastcgi" killall -9 php5-cgi RETVAL=$? ;; restart) echo "Restarting fastcgi" killall -9 php5-cgi $PHP_SCRIPT RETVAL=$? ;; *) echo "Usage php-fastcgi {start|stop|restart}" exit 1 ;; esac exit $RETVAL 権限を設定します。 sudo chmod 755 /etc/init.d/fastcgi fastcgiを起動してみます。 sudo /etc/init.d/fastcgi start サーバー起動時に起動するようにします。 sudo update-rc.d fastcgi defaults /etc/nginx/sites-available/domain1.comのserver毎にに以下の内容を追加します。 location ~ \.php$ { fastcgi_pass 127.0.0.1 9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /home/user/public_html/mydomain.com/public$fastcgi_script_name; include /etc/nginx/fastcgi_params; } /etc/nginx/sites-available/domain1.comの内容 下のようになります。 server { listen 80; server_name www.domain1.com; access_log /home/demo/public_html/domain1.com/log/access.log; error_log /home/demo/public_html/domain1.com/log/error.log; location / { root /home/demo/public_html/domain1.com/public/; index index.html index.php; } location ~ \.php$ { fastcgi_pass 127.0.0.1 9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /home/demo/public_html/domain1.com/public$fastcgi_script_name; include /etc/nginx/fastcgi_params; } } server { listen 80; server_name domain1.com; access_log /home/demo/public_html/domain1.com/log/access.log; error_log /home/demo/public_html/domain1.com/log/error.log; location / { root /home/demo/public_html/domain1.com/public/; index index.html index.php; } location ~ \.php$ { fastcgi_pass 127.0.0.1 9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /home/demo/public_html/domain1.com/public$fastcgi_script_name; include /etc/nginx/fastcgi_params; } } nginxを再起動 sudo /etc/init.d/nginx stop sudo /etc/init.d/nginx start これでnginxでphpスクリプトが動作します。 ここまでがnginxの基本設定となります。 お薦めの海外サーバー linodeでnginxを作動させています。
https://w.atwiki.jp/josoge/pages/51.html
http //jososho2.hp.infoseek.co.jp/projectj/index.html こちらで新作やってます http //www21.atwiki.jp/josoge/pages/27.html コメントがあればこちらへどうぞ
https://w.atwiki.jp/anshangrila/
INDEX 此処は、のら管理人・吉良弌 Kiraichi と紕辜 Hidumi がのらりくらりと訳の解らないモノを排出していく非公式よろず同人ファンサイトです。 と、言うのも節操なしにやって行く予定なので何が出てくるか自分達にも解っていません。 落書き中心に特に目立った活動をする予定もなく運営していきます。 以下の注意事項をお読みになり、自己判断にてお入り下さい。 1.非公式・同人・ファンサイトの意味が解らない。もしくは理解できない方。 2.荒らしが目的の方 3.両管理人が嫌いな方 以上に当てはまる方はブラウザバックでお戻り下さい。 注意事項をすっとばしてお進みになり気分を害した等のクレームは受け付けません。 ドウゾ宜しく。 by.吉良弌 紕辜 家の看板息子:livlyのアマティエル 可愛がってあげてください。 審判の日 飼い主 吉良弌 Livly アマティエル #ref error :ご指定のファイルが見つかりません。ファイル名を確認して、再度指定してください。 ( noedit script language="JavaScript" src="http //www.livly.com/f.php?uid=343s s=3" /script /noedit )
https://w.atwiki.jp/m_shige1979/pages/1586.html
nginx+php5.5+php-fpm 概要 nginx+php5.5+php-fpmの環境設定手順 環境 CentOS6.x 64bit 手順 # nginxをインストール wget http //nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm rpm -ivh nginx-release-centos-6-0.el6.ngx.noarch.rpm vim /etc/yum.repos.d/nginx.repo ---- [nginx] name=nginx repo baseurl=http //nginx.org/packages/centos/6/$basearch/ gpgcheck=0 enabled=1 ---- # インストール yum install -y nginx # 基本設定ファイル編集 vim /etc/nginx/nginx.conf ---- user nginx; worker_processes 2; error_log /var/log/nginx/error.log warn; pid /var/run/nginx.pid; events { worker_connections 1024; } http { include /etc/nginx/mime.types; default_type application/octet-stream; log_format main $remote_addr - $remote_user [$time_local] "$request" $status $body_bytes_sent "$http_referer" "$http_user_agent" "$http_x_forwarded_for" ; access_log /var/log/nginx/access.log main; sendfile on; #tcp_nopush on; keepalive_timeout 65; #gzip設定; gzip on; gzip_types text/plain text/xml text/css text/javascript image/x-icon application/xml application/rss+xml application/json application/x-javascript; gzip_disable "MSIE [1-6]\."; gzip_disable "Mozilla/4"; # トークン他 server_tokens off; ignore_invalid_headers on; # 設定ファイル読み込み include /etc/nginx/conf.d/*.conf; } ---- # 自動起動、再起動 service nginx start chkconfig nginx on # phpenvをインストール cd curl https //raw.github.com/CHH/phpenv/master/bin/phpenv-install.sh | sh echo export PATH="$HOME/.phpenv/bin $PATH" ~/.bash_profile echo eval "$(phpenv init -)" ~/.bash_profile source ~/.bash_profile which phpenv mkdir -p ~/.phpenv/plugins cd ~/.phpenv/plugins git clone git //github.com/CHH/php-build.git chmod 755 php-build/bin/rbenv-install phpenv install usage phpenv install VERSION Available versions 5.2.17 5.3.10 5.3.11 いろいろ 5.5.5 5.5snapshot master yum --enablerepo=epel install re2c libmcrypt libmcrypt-devel yum install libxml2-devel bison bison-devel openssl-devel curl-devel libjpeg-devel libpng-devel libmcrypt-devel readline-devel libtidy-devel libxslt-devel httpd-devel enchant-devel libXpm libXpm-devel freetype-devel t1lib t1lib-devel gmp-devel libc-client-devel libicu-devel oniguruma-devel net-snmp net-snmp-devel bzip2-devel vim /root/.phpenv/plugins/php-build/share/php-build/definitions/5.5.5 ---- configure_option "--with-apxs2=/usr/sbin/apxs --enable-fpm --with-fpm-user=nginx --with-fpm-group=nginx --enable-fileinfo --enable-hash --enable-json --enable-sysvsem --enable-sysvshm --enable-sysvmsg --enable-bcmath --with-bz2 --enable-ctype --with-iconv --enable-ftp --with-gettext --enable-mbstring --with-onig=/usr --with-pcre-regex --with-mysql=mysqlnd --with-mysql-sock=/tmp/mysql.sock --enable-phar --enable-shmop --enable-sockets --enable-simplexml --enable-dom --with-libxml-dir=/usr --enable-tokenizer --with-zlib --with-kerberos=/usr --with-openssl=/usr --enable-soap --enable-zip --with-mhash=yes --without-mm --with-enchant=/usr --with-zlib-dir=/usr --with-gd --enable-gd-native-ttf --with-gmp=/usr --with-jpeg-dir=/usr --with-xpm-dir=/usr/X11R6 --with-png-dir=/usr --with-freetype-dir=/usr --with-imap=/usr --with-imap-ssl --enable-intl --with-t1lib=/usr --with-mcrypt=/usr --with-snmp=/usr" install_package "http //www.php.net/distributions/php-5.5.5.tar.bz2" install_pyrus install_xdebug "2.2.3" enable_builtin_opcache ---- # install phpenv install 5.5.5 # モジュールをコピー cp /etc/httpd/modules/libphp5.so /root/.phpenv/versions/5.5.5/libphp5.so phpenv rehash phpenv global 5.5.5 php -v # php-fpm mkdir /var/log/php-fpm chown -R nobody nobody /var/log/php-fpm cp -f /tmp/php-build/source/5.5.5/sapi/fpm/php-fpm.conf /usr/local/etc/php-fpm.conf # サービス用起動スクリプトをコピー cp -f /tmp/php-build/source/5.5.5/sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm chmod 755 /etc/init.d/php-fpm chkconfig php-fpm on # /etc/init.d/php-fpmを編集してconfファイルの場所を変更する ---- # php_fpm_CONF=${prefix}/etc/php-fpm.conf ↓ php_fpm_CONF=/usr/local/etc/php-fpm.conf ---- # php-fpm.confを編集 vim /usr/local/etc/php-fpm.conf ---- [global] pid = run/php-fpm.pid [www] user = nginx group = nginx listen = 127.0.0.1 9000 listen.owner = nginx listen.group = nginx listen.mode = 0666 pm = dynamic pm.max_children = 8 pm.start_servers = 4 pm.min_spare_servers = 2 pm.max_spare_servers = 4 pm.max_requests = 500 ---- # 起動 service php-fpm start chkconfig php-fpm on # ログとドキュメントのディレクトリを作成 mkdir -p /var/log/nginx/dev1.example.com mkdir -p /var/www/html/dev1.example.com/public # nginxファイル作成 vim /etc/nginx/conf.d/dev1.example.com.conf ---- server { # ポート、サーバネーム listen 80; server_name dev1.example.com; # アクセスログ、エラーログ access_log /var/log/nginx/dev1.example.com/access.log main; error_log /var/log/nginx/dev1.example.com/error.log; # ドキュメントルート root /var/www/html/dev1.example.com/public; # indexファイル index index.php index.html index.htm; # phpの処理 location ~ \.php$ { fastcgi_pass 127.0.0.1 9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } # アクセスを制限する location ~ (\.htaccess|\.git|\.svn) { deny all; } # 文字コード charset utf-8; } ---- # 再起動 service nginx restart service php-fpm restart # 簡単なファイルを配置して確認 echo " ?php echo test ; phpinfo();" /var/www/html/dev1.example.com/public/index.php
https://w.atwiki.jp/memcache/pages/36.html
HTTP Header Proxy ServerWeb Debugging Proxy LINK SSL Pass-Thu HTTP Header http //www.tohoho-web.com/ex/http.htm http //web-tan.forum.impressrd.jp/e/2010/01/12/7156 Proxy Server http //howto.ysn-jp.com/tor/tor_what.php http //www.atmarkit.co.jp/fwin2k/win2ktips/031autoproxy/autoproxy.html Web Debugging Proxy Fiddler http //www.fiddler2.com/fiddler2/ LINK Studying HTTP http //www.studyinghttp.net/ Smart http //www.rfs.jp/sb/perl/03/03.html HTTPプロトコルとサーバへのリクエスト(FUJITSU) http //jp.fujitsu.com/solutions/sdas/technology/web-apl/01-http-protocol.html
https://w.atwiki.jp/naobe/pages/78.html
ネットワークに戻る RFC2616概要 HTTP/1.1 RFC6265概要 HTTP状態管理機構 パーセントエンコーディング(URLエンコード) URLで意味を持つコードと混同する日本語などのバイナリや特殊記号を16進形式にして、先頭に%を付加した文字に変換する。正確に言うと、非予約文字、予約文字以外を変換する。 項目 説明 非予約文字 ASCIIのコード範囲内の英字(大文字・小文字)、数字、ハイフン “-”、ピリオド “.”、アンダースコア “_”、チルダ “~” 予約文字 URIを表す符号。ASCIIのコード範囲内のコロン “ ”、スラッシュ “/”、疑問符 “?”、シャープ “#”、角括弧 “[”、“]”、単価記号 “@”、感嘆符 “!”、ドル記号・ペソ記号 “$”、アンパサンド “ ”、アポストロフィー・シングルクオート “ ”、丸括弧 “(”、“)”、アスタリスク “*”、正符号・加算記号 “+”、コンマ “,”、セミコロン “;”、等号 “=” name=%E8%8F%85%E7%9B%B4%E4%BA%BA UTF-8で、%E8%8F%85:菅, %E7%9B%B4 直, %E4%BA%BA 人 x-www-form-urlencoded(URLエンコード) POSTのフォームデータをエンコードする。%を付加する方式は、パーセントエンコーディングと同じ。パーセントエンコーディングの予約文字も変換している スペースは"+"に変換。Javaのソースを見ると、英数字、"-","_", ".","*"以外を変換する BASE64 Wikipediaより データを64種類の印字可能な英数字のみを用いて、それ以外の文字を扱うことの出来ない通信環境にてマルチバイト文字やバイナリデータを扱うためのエンコード方式 7ビットのデータしか扱うことの出来ない電子メールにて広く利用されている A–Z, a–z, 0–9 までの62文字と、記号2つ (+ , /) 、さらにパディング(余った部分を詰める)のための記号として = が用いられる 76文字ごとに改行コードが入る Cookie Wikipediaより クッキーを設定する際、どの要求に対してクッキー情報を送り返すのか、URLの範囲を指定する。 規定値は、クッキーを設定したサーバに対するすべての要求であり、対象を広げることも狭めることもできる。ただし広げる場合でも、トップレベルドメインより狭い範囲でなければならない。 またクッキーの有効期限は、通常はブラウザを終了するまでだが、指定した期限まではブラウザを再度起動しても保持されるように設定することができる。有効期限の情報も、サーバからブラウザにクッキー情報を送信する段階で付加される。 無期限という設定は出来ない。 詳細: http //www.studyinghttp.net/cookies リクエスト 全てテキスト。行(CRLF)で区切られる。 フォーマット リクエストラインは1行。ヘッダは複数行。 大項目 小項目 説明 リクエストライン メソッド GET,POST,PUTなどのどれか。 リクエストURL リクエストを処理するURI プロトコルバージョン HTTPのバージョン。【例】HTTP/1.1 ヘッダ HOST リクエスト先のホスト名。必須項目 空行 POSTのときにヘッダの終了を示すために挿入される メッセージボディ POSTのときにリクエストデータを出力する 【例】 GET http //example.jp/31/31-001.php HTTP/1.1 リクエストライン Host example.jp --+ User-Agent Mozilla/5.0 (Windows NT 5.1; rv 2.0.1) Gecko/20100101 Firefox/4.0.1 | Accept text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 +-- ヘッダ Accept-Language ja,en-us;q=0.7,en;q=0.3 | Accept-Encoding gzip, deflate | Accept-Charset Shift_JIS,utf-8;q=0.7,*;q=0.7 | Keep-Alive 115 | Connection keep-alive | Referer http //example.jp/31/ --+ Accept-CharsetでShift-JISの品質係数が1であるため、サーバは、Shift-JISでエンコードしたメッセージを返す。 POST http //example.jp/31/31-003.php HTTP/1.1 リクエストライン Accept image/gif, image/jpeg, image/pjpeg, image/pjpeg, application/vnd.ms-excel ヘッダ Referer http //example.jp/31/31-002.php Accept-Language ja User-Agent Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; Inf oPath.1; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729) Content-Type application/x-www-form-urlencoded Accept-Encoding gzip, deflate Host example.jp Content-Length 65 Connection Keep-Alive Pragma no-cache name=%E8%8F%85%E7%9B%B4%E4%BA%BA mail=kan@aaa.jp gender=%E7%94%B7 メッセージボディ Hostヘッダ HTTP1.1では必須。POST/GETでのURIにHOSTを指定していなかった場合、Virtualホストを特定できない。そのためHostヘッダにHOST名を指定する。URIにホスト名があって、Hostヘッダにもホスト名がある場合はURIを優先する。URIにホスト名を指定することを強制すれば良いような気がするが。 Referer ヘッダの一種。リンク元のURLを示す。あるWebページのリンクをクリックして別のページに移動したときの、リンク元のページのこと。 改変、削除される場合があるので正しくリンクを示しているとは限らない。 セキュリティ上、問題となるのは、URLが秘密情報を含んでいる場合。たとえば、URLがセッションIDを含んでいる場合。なりすましに使われる可能性がある。 【例】 GET http //example.jp/31/31-002.php HTTP/1.1 Accept image/gif, image/jpeg, image/pjpeg, image/pjpeg, application/vnd.ms-excel, application/vnd.ms-powerpoint, appl ication/msword, application/x-shockwave-flash, application/x-ms-application, application/x-ms-xbap, application/vnd.ms -xpsdocument, application/xaml+xml, */* Referer http //example.jp/31/ Accept-Language ja User-Agent Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; Inf oPath.1; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729) Accept-Encoding gzip, deflate Host example.jp Connection Keep-Alive http //example.jp/31/のHTMLのaタグからリクエストが発生したため、Refererヘッダがつく。 レスポンス 全てテキスト。行で区切られる。 フォーマット ステータスラインは1行。ヘッダ、ボディは複数行。 大項目 小項目 説明 ステータスライン プロトコルバージョン ステータスコード 1XX 処理継続、2XX 正常終了、3XX リダイレクト、4XX クライアントエラー、5XX サーバエラー テキストフレーズ レスポンスヘッダ Content-Length ボディのバイト数 Content-Type MIMEタイプ; charset=エンコーディング 空行 ヘッダの終わりを示す ボディ 【例】 HTTP/1.1 200 OK Date Wed, 04 May 2011 04 51 51 GMT Server Apache/2.2.14 (Ubuntu) X-Powered-By PHP/5.3.2-1ubuntu4.2 Vary Accept-Encoding Content-Length 20 Keep-Alive timeout=15, max=100 Connection Keep-Alive Content-Type text/html; charset=UTF-8 body 13 51 /body Content-type メディアタイプを示すエンティティヘッダ(メッセージボディに対する付随情報)。type "/" subtype *( ";" parameter )であらわされる。text/html; charset=utf-8など。charsetを追加すると出力の文字コードを示す。HTML文書にapplication/octet-streamを付けると、 多くの場合、Webブラウザはそれをダウンロードするか否か問い合わせるようになる。 Apacheの場合は、httpd.confの以下の設定でcharsetを指定する。 AddDefaultCharset UTF-8 Tomcatでは、JSPのpageディレクティブで設定する。 %@ page language="java" contentType="text/html; charset=Windows-31J" pageEncoding="Windows-31J" % http //www.atmarkit.co.jp/fjava/rensai3/mojibake01/mojibake01.html 参照
https://w.atwiki.jp/ransu/pages/12.html
以下は、http //schiphol.2ch.net/test/read.cgi/handygover/1244460430/l50から引用 【MHP2】ランスガンス専用攻略 テンプレサイト【MHP2G】 質問前に、以下のサイト参照 【MHP2Gwiki】 http //www41.atwiki.jp/mhp2g/ 【MHP2G用ダメージ計算サイト】 http //wizeweb.net/mhp2gcalc/ 【MHP2時代のテンプレ】 http //2nd.geocities.jp/ransugansu/ransu/ransumhp2.html 【テンプレサイト】 (旧跡地) http //2nd.geocities.jp/ransugansu/index.html (wiki) 前スレ 【MHP2】ランスガンス専用攻略 ○突き目【MHP2G】 http 次スレは 950以降に現行スレで申告した上で立てて下さい テンプレは現行スレをそのままコピペするのではなく テンプレサイトを参照し、更新があればそちらをコピペして下さい
https://w.atwiki.jp/installmaniax3/pages/37.html
a-blog 配布サイト http //www.a-blog.jp/ 準備 ionCubeローダのインストール インストール手順 ファイルを展開 IISマネージャーでアプリケーションを追加 エイリアス:a-blog アプリケーションプール:zendserver 物理パス:展開フォルダー/a-blog a-blogアプリケーションに[[ionCubeローダの設定]を参考にPHP_IONCUBEモジュールハンドラーを追加する。 DBを作成する。 インストーラー(index.php)を実行する。 インストーラーにしたがってサイト情報、DB情報等を設定する。 setupフォルダーを削除する。 動作確認 http //oosawak.ath.cx/a-blog/ 問題点 Zend Server では、動作NG PHP で動作OK mktime() のワーニングが表示される。
https://w.atwiki.jp/fujimo-dia/pages/333.html
ちょこちょこいじってるので、そのうちまとめようかと。 マニュアル http //www.php.net/manual/ja/index.php 入門 http //www.flzphp.com/ ダウンロード http //www.php.net/ アパッチ http //www.apache.jp/